<template>
  <a-radio-group :options="options" v-model:value="val" @change="change" />
</template>

<script>
import { ref } from '@vue/reactivity';
const options = [
  {
    label: 'Apple',
    value: 'Apple',
  },
  {
    label: 'Pear',
    value: 'Pear',
  },
  {
    label: 'Orange',
    value: 'Orange',
  },
];
export default {
    props:{
        options:{//选项
            type:Array,
            required:true
        },
        currentVal:{//当前选中值
            type:String,
            required:true
        }
    },
    setup(){
        const val = ref("Apple")

        const change = (e)=>{
            console.log(e.target.value)
        }
        return{
            options,
            val
        }
    }
}
</script>

<style>

</style>